package com.wy.springbootblog.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @author work
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("`article_tag`")
public class ArticleTag {
    @TableId
    private Integer id;

    @TableField("article_id")
    @NotNull(message = "文章id不能为空")
    private Integer articleId;

    @TableField("tag_id")
    @NotNull(message = "标签id不能为空")
    private Integer tagId;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("update_time")
    private LocalDateTime updateTime;

    private Integer flag;
}
